package com.chixing.day12.Factory;

public class PhoneFactory {
    public Phone getPhone(int type){
        Phone phone = null;
        switch (type){
            case 0: phone = new HuaweiPhone();break;
            case 1: phone = new OppoPhone();break;
            case 2: phone = new Iphone();break;
            default:phone = null;break;
        }
        return phone;
    }
}
